package com.company.sendemo.basics.zzInterview.write;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.stream.Collectors;

public class DemoFifteen {

    public static void main(String[] args) {
        ArrayList<String> phoneNumbers = new ArrayList<String>();
        phoneNumbers.add("0668-8976551");
        phoneNumbers.add("0668-8976362");
        phoneNumbers.add("0668-8976563");
        phoneNumbers.add("0668-8976666");
        phoneNumbers.add("0668-8976666");
        phoneNumbers.add("0668-8976764");
        phoneNumbers.add("0667-8976165");
        phoneNumbers.add("0668-8976666");


        ArrayList arrayListnew = new ArrayList<>();
        for (String s : phoneNumbers) {
            if (!arrayListnew.contains(s)) {
                arrayListnew.add(s);
                //便利旧集合没有就添加到新集合
            }
        }
        //工单将优先级倒序排序
        Object collect = arrayListnew.stream().sorted().collect(Collectors.toList());
        System.out.println(collect);






}

}
